package com.hnnou.freshmenappserver.service.impl;

import com.hnnou.freshmenappserver.bean.Message;
import com.hnnou.freshmenappserver.bean.vo.MessagePageVo;
import com.hnnou.freshmenappserver.dao.MessageDao;
import com.hnnou.freshmenappserver.service.MessageService;
import org.apache.ibatis.session.RowBounds;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MessageServiceImpl implements MessageService {
    @Autowired
    MessageDao messageDao;

    public List<Message> findAll() {
        return messageDao.findAll();
    }

    @Override
    public Message selectById(Integer id) {

        return messageDao.selectById(id);
    }

    @Override
    public int deleteById(Integer id) {
        return messageDao.deleteById(id);
    }

    @Override
    public int update(Message message) {
        return messageDao.update(message);
    }

    @Override
    public int insert(Message message) {
        return messageDao.insert(message);
    }

    @Override
    public List<Message> selectByPage(MessagePageVo messagePageVo) {
        return messageDao.selectByPage(messagePageVo);
    }
}
